<?php
// +----------------------------------------------------------------------
// | 杭州十禾信息科技有限公司
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2015 http://www.shelpe.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: LeePuman <ysyzlsm@163.com>
// +----------------------------------------------------------------------

/**
 * 显示用户信息的动态查询ajax挂件
 */
class ShowMessageWidget  extends  Widget { 

	protected $template = 'think';

    public function render($data){
		if( session("me") && session('me') != '管理员登录'){
		  $userfirst = 0;
		  $user = session('me');
			$init = $user['status'];
			if($user['userfirst'] == 0){
				$userfirst =1;
			}
			$javascript = '<script type="text/javascript">var init = '.$init.', userfirst = '.$userfirst.'</script>';
		}else{
			$javascript = "";
		}
        return $javascript;  
    } 

}